Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement support for running MetaCall from python.exe and node.exe. #533

Draft
wants to merge 14 commits into
base: develop
Choose a base branch
from

Conversation

viferga
Copy link
Member

@viferga viferga commented Nov 21, 2024

This feature implements support for this: #231 #460 (comment)

For implementing this, there's few details we will require:

  • We must provide a mechanism to identify the host language
  • We must define a way to initialize the loader as host
  • We have to search for metacall library in the ports:
    • NodeJS
    • Python
    • Ruby
    • ... any other?
  • We must modify the loaders in order to support host languages:
    • NodeJS
    • Python
    • Ruby
    • ... any other?
  • We have to disable linking of the dependencies of the loaders, and move them to the configuration file, then load those dependencies before we initialize the loaders. This is a trick to allow loaders to have unresolved symbols and link to the host if the host language is the one running metacall, or link them against the dependencies.
  • Bootstrapping of libmetacall.so and metacall.h by using the C Loader with metacall_load_from_package, so we do not need to implement any other API if the ports, we can bootstrap all of them easily.
  • Make it work for:
    • Linux
    • Windows
    • MacOS
  • Add full testing including integration tests with metacall/install and tests with multiple versions of NodeJS (compiled statically or dynamically), Python, and with different libc (Alpine) or different glibc versions.

@viferga viferga marked this pull request as draft November 21, 2024 17:30
@viferga
Copy link
Member Author

viferga commented Dec 5, 2024

I have achieved to make it work for NodeJS, there's still a lot of work to do but this PoC demonstrates that it's possible and we will achieve it:
metacall-working

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant